/* 知识库设置样式 */
.knowledge-settings {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
}

.knowledge-settings .ant-list-item {
  transition: all 0.2s ease;
  padding: 16px !important;
  margin-bottom: 12px !important;
}

.knowledge-settings .ant-list-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.knowledge-settings .ant-card {
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.knowledge-settings .ant-card .ant-card-body {
  padding: 20px !important;
}

.knowledge-settings .ant-card .ant-card-head {
  padding: 0 20px !important;
}

.knowledge-settings .ant-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 状态标签样式 */
.knowledge-settings .ant-tag {
  border-radius: 12px;
  font-size: 11px;
  padding: 4px 12px;
  margin: 2px 4px;
}

/* 搜索高亮样式 */
.knowledge-settings mark {
  padding: 1px 2px;
  border-radius: 2px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .knowledge-settings {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .knowledge-settings .w-1/3 {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding-right: 0;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .knowledge-settings .flex-1 {
    padding-left: 0 !important;
  }

  .knowledge-settings .ant-list-item {
    padding: 12px !important;
    margin-bottom: 8px !important;
  }

  .knowledge-settings .ant-card .ant-card-body {
    padding: 16px !important;
  }
}

/* 暗色主题适配 */
.dark .knowledge-settings .ant-list-item {
  border-color: #333333;
}

.dark .knowledge-settings .ant-card {
  background-color: #1f1f1f;
  border-color: #333333;
}

.dark .knowledge-settings mark {
  background-color: #facc15;
  color: #000;
}

/* 加载状态样式 */
.knowledge-settings .ant-spin-container {
  min-height: 200px;
}

/* 空状态样式 */
.knowledge-settings .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #9ca3af;
}

.knowledge-settings .empty-state .anticon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* 文档列表项样式 */
.knowledge-settings .document-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.knowledge-settings .document-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* 知识库卡片样式 */
.knowledge-settings .kb-card {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 20px;
  margin-bottom: 16px;
}

.knowledge-settings .kb-card.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.dark .knowledge-settings .kb-card.selected {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

/* 操作按钮样式 */
.knowledge-settings .action-buttons {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}

.knowledge-settings .action-buttons .ant-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  height: auto;
}

/* 预览模态框样式 */
.knowledge-preview-modal .ant-modal-body {
  padding: 0;
}

.knowledge-preview-modal .preview-content {
  max-height: 60vh;
  overflow-y: auto;
}

/* 分块内容样式 */
.knowledge-settings .chunk-content {
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 元数据标签样式 */
.knowledge-settings .metadata-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.knowledge-settings .metadata-tags .ant-tag {
  margin: 0;
  font-size: 10px;
}

/* 搜索结果样式 */
.knowledge-settings .search-results {
  margin-top: 16px;
}

.knowledge-settings .search-result-item {
  border-left: 3px solid #3b82f6;
  padding-left: 12px;
  margin-bottom: 16px;
}

/* 文件上传区域样式 */
.knowledge-settings .upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.knowledge-settings .upload-area:hover {
  border-color: #3b82f6;
  background-color: #f8fafc;
}

.dark .knowledge-settings .upload-area:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

/* 统计信息样式 */
.knowledge-settings .stats-info {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.dark .knowledge-settings .stats-info {
  color: #9ca3af;
}

/* 处理状态样式 */
.knowledge-settings .process-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-settings .status-pending {
  color: #f59e0b;
}

.knowledge-settings .status-processing {
  color: #3b82f6;
}

.knowledge-settings .status-completed {
  color: #10b981;
}

.knowledge-settings .status-failed {
  color: #ef4444;
}

/* 滚动条样式 */
.knowledge-settings ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.knowledge-settings ::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.knowledge-settings ::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.knowledge-settings ::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.dark .knowledge-settings ::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.dark .knowledge-settings ::-webkit-scrollbar-thumb {
  background: #5a5a5a;
}

.dark .knowledge-settings ::-webkit-scrollbar-thumb:hover {
  background: #6a6a6a;
}

/* 额外的间距优化 */
.knowledge-settings .ant-list-item-meta-title {
  margin-bottom: 8px !important;
}

.knowledge-settings .ant-list-item-meta-description {
  line-height: 1.5 !important;
}

.knowledge-settings .ant-modal-body {
  padding: 24px !important;
}

.knowledge-settings .ant-modal-header {
  padding: 20px 24px !important;
}

.knowledge-settings .ant-modal-footer {
  padding: 16px 24px !important;
}

/* 按钮间距 */
.knowledge-settings .ant-btn {
  margin: 0 4px;
}

.knowledge-settings .ant-btn:first-child {
  margin-left: 0;
}

.knowledge-settings .ant-btn:last-child {
  margin-right: 0;
}

/* 表单项间距 */
.knowledge-settings .ant-form-item {
  margin-bottom: 20px;
}

.knowledge-settings .ant-form-item:last-child {
  margin-bottom: 0;
}

/* 搜索框样式 */
.knowledge-settings .ant-input-search {
  margin-bottom: 16px;
}

.knowledge-settings .ant-input-search .ant-input {
  padding: 12px 16px;
}

/* 标签页按钮样式 */
.knowledge-settings .tab-buttons .ant-btn {
  padding: 8px 20px;
  height: auto;
  margin-right: 12px;
}

/* 空状态样式优化 */
.knowledge-settings .empty-state p {
  margin-top: 16px;
  font-size: 16px;
  color: #9ca3af;
}

.dark .knowledge-settings .empty-state p {
  color: #6b7280;
}
